package com.woyowodaows.utils;

import android.app.Activity;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * Created by Administrator on 2019/4/10.
 */

public class JpushTagData {
    private static  Set<String> jpushStack;
    private static JpushTagData instance;
    public static JpushTagData getInstance() {
        if (instance == null) {
            synchronized (JpushTagData.class) {
                if (instance == null) {
                    instance = new JpushTagData();
                }
            }
        }
        return instance;
    }
    private JpushTagData() {

    }
    public void addJpushTag(Set<String> tags) {
        if (jpushStack == null) {
            jpushStack = new HashSet<String>();
        }
        jpushStack.addAll(tags);

    }
    public  Set<String> getJpushData(){

        return  jpushStack;
    }

    /**
     * 删除堆栈中的当前Activity
     */
    public void removeJpushTag(Set<String> tags) {
        if (tags!= null) {
            jpushStack.removeAll(tags);
        }
    }

}
